Skip to content

Remove wmi for Get physical CPU core count #1839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 5, 2025

Conversation

OrbintSoft
Copy link
Contributor

@OrbintSoft OrbintSoft commented Apr 13, 2025

Reimplemented get physical core count with windows api, so we can get rid of wmi.

@Lomanic Lomanic self-assigned this Apr 16, 2025
@Lomanic Lomanic changed the title Remove wmi for Get physical core count Remove wmi for Get physical CPU core count Apr 16, 2025
Copy link
Collaborator

@Lomanic Lomanic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, thanks a lot @OrbintSoft. Tested on my windows 10 laptop, compared to psutil.cpu_counts(logical=False) and everything is fine.

Besides my other remarks, would you also mind squashing your commits?

@OrbintSoft
Copy link
Contributor Author

for the commits you can do a squash and merge once you approve.

@OrbintSoft OrbintSoft requested a review from Lomanic April 16, 2025 18:20
@OrbintSoft OrbintSoft requested a review from shirou April 17, 2025 04:27
@Lomanic
Copy link
Collaborator

Lomanic commented Apr 24, 2025

LGTM besides my last nit in https://github.com/shirou/gopsutil/pull/1839/files#r2047042897, but it's kind of personal preference, so can be merged at will. Thanks again @OrbintSoft 🙏

@OrbintSoft
Copy link
Contributor Author

Can we merge or do you need other changes?

Copy link
Owner

@shirou shirou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for updating the PR, and sorry for the delay—I'll go ahead and merge it now. We truly appreciate your great contribution!

@shirou shirou merged commit d5e33f7 into shirou:master May 5, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants